<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>
    class Person{
        name;
        age;
        other = () => {

        }

        constructor(name, age) {
            this.name = name
            this.age = age
        }

        walk() {
            console.log(name + "走路" + age);
        };
    }

    class Student extends Person{
        sex = 'man'

        constructor(name, age) {
            super(name, age);
            this.hobby = 'lanqiu';
        }
    }

    const student = new Student('zhangsan', 19)
    console.log(student)
</script>
</body>
</html>